<template>
  <div id="app">
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive"></router-view>
  </div>
</template>

<script>
  import {
    Indicator,
    Toast
  } from 'mint-ui';
  export default {
    name: 'App',
    created: function () {
      var vm = this;
      //   登录状态
      var url = window.location.href.lastIndexOf("\/");
      var uri = window.location.href.substring(url + 1, window.location.href.length);
      var Sid = localStorage.getItem('Sid') ? localStorage.getItem('Sid') : 'CTHH';
      console.log(uri)
      if (uri != 'Login' && uri != '') {
        if (localStorage.getItem('sessionId') == null) {
          if (sessionStorage.getItem('sessionId') != null) {

          } else {
            Indicator.open({
              text: '登陆失效...',
            });
            setTimeout(() => {
              Indicator.close();
              vm.$router.push({
                path: `/Login`
              })
            }, 1000);
          }
        }
      }



    },
    methods: {

    },
    mounted() {}


  }

</script>

<style>
  @import "/assets/css/Format.css";
  @import "/assets/css/base.css";
  @import "/assets/css/swiper.min.css";

  html,
  body {
    background-color: #F3F3F3;
    height: 100%;

  }

  #app {
    background-color: #F3F3F3;
    width: 100%;
    height: 100%;
    /*overflow: hidden;
		position: relative;*/
    /*padding-bottom:70px;*/
  }

  .el-select .el-input__inner:focus {
    border-color: #dcdfe6;
  }

  .el-select .el-input.is-focus .el-input__inner {
    border-color: #dcdfe6;
  }

  .el-select-dropdown__item.selected {
    color: #F6991A;
    font-weight: normal;
  }

  .mint-datetime-action {
    color: #F6991A;
  }

  .mint-datetime-cancel {
    color: #9a9a9a !important;
  }

  .mint-datetime-confirm {
    background-color: #F6991A;
    color: #FFF !important;
  }

</style>
